package com.blb.zycommunity.config;


import com.blb.zycommunity.entity.SysLogininfor;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;

@Component
@Aspect
public class LoginAspect {

    @Around("@annotation(autoLogin)")
    public Object doAround(ProceedingJoinPoint joinPoint, AutoLogin autoLogin){
        HttpServletRequest request =
                ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();

        SysLogininfor sysLogininfor = new SysLogininfor();



        return null;
    }
}
